<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="FileManagement.aspx.cs" Inherits="Admin_FileManagement" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Main" Runat="Server">
    <h4>
        File Management</h4>
    <br />
    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%">
        <tr>
            <td align="center" style="width: 100px" valign="top">
    <asp:Label ID="labUploadMessage" runat="server"></asp:Label>&nbsp;<asp:MultiView
        ID="MultiView1" runat="server" ActiveViewIndex="1" OnActiveViewChanged="MultiView1_ActiveViewChanged">
        <asp:View ID="View1" runat="server">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="center" colspan="2" style="width: 100px">
    </td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 100px">
                            File</td>
                        <td align="left" style="width: 100px">
    <asp:FileUpload ID="fulFile" runat="server" Width="367px" /></td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 100px">
    Version</td>
                        <td align="left" style="width: 100px">
    <asp:TextBox ID="tboVersion" runat="server" Width="361px"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 100px">
    Description</td>
                        <td align="left" style="width: 100px">
    <asp:TextBox ID="tboDescription" runat="server" TextMode="MultiLine" Width="395px" Height="129px"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <td align="right" style="width: 100px">
                        </td>
                        <td align="left" style="width: 100px">
    <asp:CheckBox ID="cboIsPublic" runat="server" Text="Public" /></td>
                    </tr>
                    <tr>
                        <td style="width: 100px">
                            <asp:ImageButton ID="ibuCancel" runat="server" OnClick="ibuCancel_Click" SkinID="cancel" /></td>
                        <td align="left" style="width: 100px">
                            &nbsp;<asp:ImageButton ID="ibuSave" runat="server" OnClick="ibuSave_Click" SkinID="save" /></td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2" style="width: 100px">
                            &nbsp;</td>
                    </tr>
                </table>
        </asp:View>
        <asp:View ID="View2" runat="server">
            &nbsp;<asp:ImageButton ID="ibuAdd" runat="server" OnClick="ibuAdd_Click" SkinID="add" />
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        DataKeyNames="FileID" DataSourceID="ObjectDataSource1">
        <Columns>
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
            <asp:BoundField DataField="Name" HeaderText="Name" ReadOnly="True" SortExpression="Name" />
            <asp:TemplateField HeaderText="Notes" SortExpression="Notes">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Height="118px" Text='<%# Bind("Notes") %>'
                        TextMode="MultiLine" Width="397px"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("Notes") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CheckBoxField DataField="IsPublic" HeaderText="IsPublic" SortExpression="IsPublic" />
            <asp:TemplateField HeaderText="Version" SortExpression="Version">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Version") %>' Width="81px"></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("Version") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Extention" HeaderText="Extention" ReadOnly="True" SortExpression="Extention" />
            <asp:BoundField DataField="Location" HeaderText="Location" ReadOnly="True" SortExpression="Location" />
            <asp:BoundField DataField="Date" HeaderText="Date" ReadOnly="True" SortExpression="Date" />
            <asp:BoundField DataField="FileID" HeaderText="FileID" ReadOnly="True" SortExpression="FileID" />
        </Columns>
        <EmptyDataTemplate>
            There are currently no files.
        </EmptyDataTemplate>
    </asp:GridView>
        </asp:View>
    </asp:MultiView></td>
        </tr>
    </table>
    &nbsp; &nbsp;<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="RemoveFile"
        InsertMethod="AddFile" SelectMethod="GetFiles" TypeName="FileManager" UpdateMethod="EditFile">
        <DeleteParameters>
            <asp:Parameter Name="FileID" Type="Int32" />
            <asp:Parameter Name="Location" Type="String" />
            <asp:Parameter Name="Name" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Location" Type="String" />
            <asp:Parameter Name="Notes" Type="String" />
            <asp:Parameter Name="Extention" Type="String" />
            <asp:Parameter Name="Version" Type="String" />
            <asp:Parameter Name="IsPublic" Type="Boolean" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="FileID" Type="Int32" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Location" Type="String" />
            <asp:Parameter Name="Date" Type="String" />
            <asp:Parameter Name="Notes" Type="String" />
            <asp:Parameter Name="Extention" Type="String" />
            <asp:Parameter Name="Version" Type="String" />
            <asp:Parameter Name="IsPublic" Type="Boolean" />
        </UpdateParameters>
    </asp:ObjectDataSource>
</asp:Content>

